package cn.melonlib.graphql.model.metadata;

import cn.melonlib.graphql.annos.GraphqlField;
import cn.melonlib.graphql.annos.GraphqlType;
import lombok.Data;

@Data
@GraphqlType(namespaces = "GraphqlMetadata",comment = "graphql参数元数据参数描述")
public class GraphqlArgument {

    public GraphqlArgument() {
    }

    public GraphqlArgument(String name, String type,String comment, boolean list, boolean required, boolean requiredBody) {
        this.name = name;
        this.type = type;
        this.comment=comment;
        this.list = list;
        this.required = required;
        this.requiredBody = requiredBody;
    }

    @GraphqlField(comment = "参数名称")
    private String name;

    @GraphqlField(comment = "参数类型")
    private String type;

    @GraphqlField(comment = "参数注释")
    private String comment;

    @GraphqlField(comment = "是否为列表")
    private boolean list;

    @GraphqlField(comment = "是否必填")
    private boolean required;

    @GraphqlField(comment = "当为列表时，内容是否必填")
    private boolean requiredBody;
}
